/*
* $Id: type.h,v 1.15 2007/11/15 12:17:50 sunny Exp $
*/
/*******************************************************************************

       UBEC (Uniband Electronic Corp.)

       Project: U-NET01, Ubiquitous network platform

       File: type.h

       Version: 0.3.0

       Usage:  Data type defitions

       Platform: U-NET01 DK with Keil 8051 C compiler

       Reference:

               Silicon Laboratories: C8051F124, C8051F340

               UBEC: UZ2400, UZ2410

       Note :

               Copyright (C) 2007 Uniband Electronic Corporation, All rights reserved

********************************************************************************/

#ifndef	__TYPE_H__
#define	__TYPE_H__

#ifndef true
#define true 0x1
#endif

#ifndef false
#define	false 0x0
#endif

//Define external memory data type
#ifdef __C51__
typedef unsigned long xdata	XUINT32;
typedef unsigned short xdata	XUINT16;
typedef unsigned char xdata	XUINT8;
typedef long xdata		XINT32;
typedef short xdata		XINT16;
typedef char xdata		XINT8;

//define the BOOLN type
typedef	bit			BOOL;

#else
//define the BOOLN type
typedef	unsigned char		BOOL;

#endif // #ifdef __C51__

typedef unsigned long		UINT32;
typedef unsigned int		UINT16;
typedef unsigned char		UINT8;
typedef signed long		INT32;
typedef signed int		INT16;
typedef signed char		INT8;
typedef unsigned long *		PUINT32;

#define ULONG   UINT32
#define USHORT  UINT16
#define UCHAR   UINT8

#define uint8 UINT8
#define uint16 UINT16

//#define EOF     (-1)

#endif // #ifndef __TYPE_H__
